<!--  -->
<template>
<div class="">
    <a-drawer :visible="modalVisible" width="60%" @close="handleClose">
        <f-search-form>
            <f-search-form-item label="物料代码" name="materialCode" />
            <f-search-form-item label="工程包代码" name="Package code" />
        </f-search-form>
        <div style="margin-top: 10px">
            <a-button type="button"> 提交 </a-button>&nbsp; <a-button type="button"> 下载模板 </a-button>&nbsp;
            <a-button type="button"> 导入数据 </a-button>
        </div>
        <f-table :scroll="{ x: 1600 }" order="createTime" style="margin-top: 60px" ref="table" size="default" :columns="columns" :dataSource="datasource">
            <span slot="action" slot-scope="text, record">
                <template>
                    <a-input style="margin: -5px 0; width: 70px" :value="text" placeholder="请输入" />
                </template>
            </span>
        </f-table>
    </a-drawer>
</div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》';

export default {
    //import引入的组件需要注入到对象中才能使用
    components: {},
    data() {
        //这里存放数据
        return {
            modalVisible: false,
            columns: [{
                    title: '序号',
                    align: 'center',
                    dataIndex: 'code',
                    width: 160,
                },
                {
                    title: '材料WBS代码',
                    align: 'center',
                    dataIndex: 'WBSCode',
                    width: 160,
                },
                {
                    title: '全物料代码',
                    align: 'center',
                    dataIndex: 'totalMaterialCode',
                    width: 160,
                },
                {
                    title: '服务WBS代码',
                    align: 'center',
                    dataIndex: 'ServiceWBSCode',
                    width: 160,
                },
                {
                    title: '服务代码',
                    align: 'center',
                    dataIndex: 'serviceCode',
                    width: 160,
                },
                {
                    title: '层级号',
                    align: 'center',
                    dataIndex: 'levelCode',
                    width: 160,
                },
                {
                    title: '科目名称',
                    align: 'center',
                    dataIndex: 'subjectName',
                    width: 160,
                },
                {
                    title: '项目',
                    align: 'center',
                    dataIndex: 'project',
                    width: 160,
                },
                {
                    title: '材料项目描述',
                    align: 'center',
                    dataIndex: 'materialProjectDesc',
                    width: 160,
                },
                {
                    title: '分承包发包项目描述',
                    align: 'center',
                    dataIndex: 'subcontractingProjectDesc',
                    width: 160,
                },
                {
                    title: '对外合同清单描述',
                    align: 'center',
                    dataIndex: 'listOfForeignContractsDesc',
                    width: 160,
                },
                {
                    title: '分区域',
                    align: 'center',
                    dataIndex: 'subregion',
                    width: 160,
                },
                {
                    title: '分系统',
                    align: 'center',
                    dataIndex: 'subsystem',
                    width: 160,
                },
                {
                    title: '合同清单工程量',
                    align: 'center',
                    dataIndex: 'contractBillQuantity',
                    width: 160,
                },
                {
                    title: '标前工程量',
                    align: 'center',
                    dataIndex: 'beforeQuantities',
                    width: 160,
                },
                {
                    title: '100预算成本工程量',
                    align: 'center',
                    dataIndex: 'oneHundredQuantities',
                    width: 160,
                },
                {
                    title: '200预算成本工程量',
                    align: 'center',
                    dataIndex: 'twoHundredQuantities',
                    width: 160,
                },
                {
                    title: '损耗',
                    align: 'center',
                    dataIndex: 'loss',
                    width: 160,
                },
                {
                    title: '计量单位',
                    align: 'center',
                    dataIndex: 'unit',
                    width: 160,
                },
                {
                    title: '本月完成工程量',
                    align: 'center',
                    dataIndex: 'thisMonthFinishQuantities',
                    width: 160,
                },
                {
                    title: '截止上月完成工程量',
                    align: 'center',
                    dataIndex: 'asOfLastMonthFinishQuantities',
                    width: 160,
                },
                {
                    title: '累计完成工程量',
                    align: 'center',
                    dataIndex: 'CumulativeFinishQuantities',
                    width: 160,
                },
                {
                    title: '本次申报',
                    align: 'center',
                    dataIndex: 'thisTimeReport',
                    fixed: 'right',
                    scopedSlots: {
                        customRender: 'action',
                    },
                    width: 112,
                },
                {
                    title: '本次确认',
                    align: 'center',
                    dataIndex: 'thisTimeConfirm',
                    fixed: 'right',
                    scopedSlots: {
                        customRender: 'action',
                    },
                    width: 112,
                },
                {
                    title: '累计申报',
                    align: 'center',
                    dataIndex: 'cumulativeReport',
                    fixed: 'right',
                    scopedSlots: {
                        customRender: 'action',
                    },
                    width: 112,
                },
                {
                    title: '累计确认',
                    align: 'center',
                    dataIndex: 'cumulativeConfirm',
                    fixed: 'right',
                    scopedSlots: {
                        customRender: 'action',
                    },
                    width: 112,
                },
            ],
            datasource: [{
                    code: '1',
                    WBSCode: '2adasd',
                    totalMaterialCode: '3ref2r3',
                    ServiceWBSCode: 'sdsds2',
                    levelCode: '1',
                    subjectName: 'dasdiwj佛山东',
                    project: 'sdisdj地级市',
                    materialProjectDesc: '描述1',
                },
                {
                    code: '2',
                    WBSCode: '3adasd',
                    totalMaterialCode: '3ref2r3',
                    ServiceWBSCode: 'sdsds2',
                    levelCode: '1',
                    subjectName: 'dasdiwj佛山东',
                    project: 'sdisdj地级市',
                    materialProjectDesc: '描述2',
                },
                {
                    code: '3',
                    WBSCode: '2adasd',
                    totalMaterialCode: '3ref2r3',
                    ServiceWBSCode: 'sdsds2',
                    levelCode: '1',
                    subjectName: 'dasdiwj佛山东',
                    project: 'sdisdj地级市',
                    materialProjectDesc: '描述3',
                },
                {
                    code: '4',
                    WBSCode: '2adasd',
                    totalMaterialCode: '3ref2r3',
                    ServiceWBSCode: 'sdsds2',
                    levelCode: '1',
                    subjectName: 'dasdiwj佛山东',
                    project: 'sdisdj地级市',
                    materialProjectDesc: '描述4',
                },
                {
                    code: '5',
                    WBSCode: '2adasd',
                    totalMaterialCode: '3ref2r3',
                    ServiceWBSCode: 'sdsds2',
                    levelCode: '1',
                    subjectName: 'dasdiwj佛山东',
                    project: 'sdisdj地级市',
                    materialProjectDesc: '描述5',
                },
            ],
        }
    },
    //监听属性 类似于data概念
    computed: {},
    //监控data中的数据变化
    watch: {},
    //方法集合
    methods: {
        handleShow(data) {
            this.isEdit = false
            this.userName = ''
            if (data && data.userId) {
                this.isEdit = true
                this.userName = data.userName
                this.formData = data
            } else {
                this.formData = {}
            }
            this.modalVisible = true
            this.handleTabClick('form1')
        },
        handleClose() {
            //this.$refs[this.current].handleReset()
            this.modalVisible = false
        },
    },
    //生命周期 - 创建完成（可以访问当前this实例）
    created() {},
    //生命周期 - 挂载完成（可以访问DOM元素）
    mounted() {},
    beforeCreate() {}, //生命周期 - 创建之前
    beforeMount() {}, //生命周期 - 挂载之前
    beforeUpdate() {}, //生命周期 - 更新之前
    updated() {}, //生命周期 - 更新之后
    beforeDestroy() {}, //生命周期 - 销毁之前
    destroyed() {}, //生命周期 - 销毁完成
    activated() {}, //如果页面有keep-alive缓存功能，这个函数会触发
}
</script>

<style lang="scss" scoped>
//@import url(); 引入公共css类
</style>
